package pkg;


import java.util.Date;

public class Archive {
	public static void archive(String path){
		  Date date;
		    Date oldDate;
		    /*
		    standard output should be used for debugging
		    File should beused for standalone conversion tool 
		    String and Document should be used for server side component
		      such as servlet or application server
		    */
		    try {
		    	//do export into XML Document
		        System.out.println("tree into XML Document: ");
		        oldDate = new Date();
		        dbsql2xml test08 = new dbsql2xml(path + "/WEB-INF/mappingXML/" + "Customers.xml", path + "/WEB-INF/mappingXML/" + "dbsql2xml.xsd", "$gvG01", "001", path + "/Customers.xml");
		        //Document outDocument08 = test08.doExportIntoDocument();
		        date = new Date();
		        System.out.println(date.getTime() - oldDate.getTime());
		        test08.doExportIntoFile();

		    } catch (Exception e) {
		      System.out.println(e.getMessage());
		      System.out.println(e.getCause());
		    } 
	}
}
